#include <stdio.h>
#include <string.h>

typedef struct Student Stu;

struct Student
{
    char name[20];
    int id;
    short major;
};

int main()
{
    Stu s = {{0}};  //相当于初始化数组元素为0，后面元素默认初始化为0
    Stu* ps = &s;

    strcpy(ps->name,"Delphi");
    ps->id = 1;
    ps->major = 908;

    (*ps).major = 910;

    printf("s.name = %s\n",s.name);
    printf("s.id = %d\n",s.id);
    printf("s.major = %d\n",s.major);


    return 0;

}
